<template>
  <!-- 直流充电桩确认表 -->
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item class="item-class" label="项目名称:" prop="projectName">
        <el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item class="item-class" label="SN码:" prop="snCode">
        <el-input v-model="queryParams.snCode" placeholder="请输入SN码" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item class="item-class" label="调试时间:" prop="debugTime">
        <el-date-picker clearable v-model="queryParams.debugTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择调试时间"></el-date-picker>
      </el-form-item>
      <el-form-item class="item-class" label="调试人:" prop="debugger">
        <el-input v-model="queryParams.debugger" placeholder="请输入调试人" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜 索</el-button>
      </el-form-item>

      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['produce:ac:confirm:add']">新增</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button type="warning" size="mini" icon="el-icon-download" @click="handleExport" v-hasPermi="['produce:ac:confirm:export']">导出</el-button>
        </el-col>
      </el-row>

      <!-- 添加或修改检测项对话框 -->
      <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
        <div class="dialogContent">
          <el-form ref="form" :model="form" :rules="rules" label-width="350px">
            <el-row>
              <el-col :span="12">
                <el-form-item label="项目名称:" prop="projectName" label-width="100px">
                  <el-input v-model="form.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item class="item-class" label="SN码:" prop="snCode" label-width="100px">
                  <el-input v-model="form.snCode" placeholder="请输入SN码" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="12">
                <el-form-item class="item-class" label="工单编号:" prop="workOrderCode" label-width="100px">
                  <el-input v-model="form.workOrderCode" placeholder="请输入工单编号" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item class="item-class" label="物料编码:" prop="material" label-width="100px">
                  <el-input v-model="form.material" placeholder="请输入物料编码" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="8">
                <el-form-item class="item-class" label="规格型号:" prop="specifications" label-width="100px">
                  <el-input v-model="form.specifications" placeholder="请输入规格型号" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="调试时间:" prop="debugTime" label-width="100px">
                  <el-date-picker clearable v-model="form.debugTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择调试时间"></el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item class="item-class" label="调试人:" prop="debugger" label-width="100px">
                  <el-input v-model="form.debugger" placeholder="请输入调试人" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="12">
                <el-form-item class="item-class" label="生产车间:" prop="workshopId" label-width="100px">
                  <el-select v-model="form.workshopId" placeholder="请选择生产车间" @change="selectTrigger(form.workshopId)">
                    <el-option v-for="item in workshopList" :key="item.workshopId" :label="item.workshopName" :value="item.workshopId"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item class="item-class" label="生产产线" prop="lineId" label-width="100px">
                  <el-select v-model="form.lineId" placeholder="请选择产线">
                    <el-option v-for="item in productionlineList" :key="item.lineId" :label="item.lineName" :value="item.lineId"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="上电前检验-铭牌信息与充电桩型号是否相符:" prop="value1">
                  <el-select v-model="form.value1" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="上电前检验-输入输出是否短路:" prop="value2">
                  <el-select v-model="form.value2" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="上电前检验-确认充电控制方式:" prop="value3">
                  <el-select v-model="form.value3" placeholder="请选择控制方式" style="width: 120px">
                    <el-option v-for="(item, index) in controlMode" :key="index" :label="item.label" :value="item.value"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="上电前检验-SIM卡卡号记录:" prop="value4">
                  <el-input v-model="form.value4" placeholder="请输入值SIM卡卡号记录" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="上电前检验-PSAM卡卡号记录:" prop="value5">
                  <el-input v-model="form.value5" placeholder="请输入PSAM卡卡号记录" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="上电前检验-CPU卡卡号记录:" prop="value6">
                  <el-input v-model="form.value6" placeholder="请输入CPU卡卡号记录" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="上电前检验-后台桩编号:" prop="value7">
                  <el-input v-model="form.value7" placeholder="请输入后台桩编号" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="安规测试-绝缘电阻值(>10MΩ):" prop="value8">
                  <el-input v-model="form.value8" placeholder="请输入绝缘电阻值(>10MΩ)" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="安规测试-介电强度值(≤10mA):" prop="value9">
                  <el-input v-model="form.value9" placeholder="请输入介电强度值(≤10mA)" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="安规测试-接地电阻值(<10mΩ):" prop="value10">
                  <el-input v-model="form.value10" placeholder="请输入接地电阻值(<10mΩ)" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-LED指示灯显示是否正常:" prop="value11">
                  <el-select v-model="form.value11" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-是否带触摸屏:" prop="value12">
                  <el-select v-model="form.value12" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-手动输入参数是否正常:" prop="value13">
                  <el-select v-model="form.value13" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-查看电表电压电流参数是否正确:" prop="value14">
                  <el-select v-model="form.value14" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-急停功能检测:" prop="value15">
                  <el-select v-model="form.value15" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-无线通讯模块检测:" prop="value16">
                  <el-select v-model="form.value16" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-APP启动付费功能测试:" prop="value17">
                  <el-select v-model="form.value17" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-带载分合电路测试:" prop="value18">
                  <el-select v-model="form.value18" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-过载保护测试:" prop="value19">
                  <el-select v-model="form.value19" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-短路保护测试:" prop="value20">
                  <el-select v-model="form.value20" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-充电接口兼容性试验:" prop="value21">
                  <el-select v-model="form.value21" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-充电控制兼容性试验:" prop="value22">
                  <el-select v-model="form.value22" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-测试CP控制导引是否正确:" prop="value23">
                  <el-select v-model="form.value23" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-CP对GND的电压检测:" prop="value24">
                  <el-select v-model="form.value24" placeholder="请选择是或否">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="带载测试-清除故障信息:" prop="value25">
                  <el-input v-model="form.value25" placeholder="请输入清除故障信息" clearable @keyup.enter.native="handleQuery" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="调试结果" prop="result">
                  <el-select v-model="form.result" placeholder="请选择结果">
                    <el-option v-for="item in debuggingResults" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item class="item-class" label="不合格类型：" prop="value55">
                  <el-select v-model="form.type" placeholder="请选择不合格类型">
                    <el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item class="item-class" label="调试问题点记录:" prop="attr1">
                  <el-input v-model="form.attr1" type="textarea" rows="5" placeholder="输入调试问题点记录" style="width: 450px; height: 100px"></el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-form-item>
              <el-button type="primary" size="mini" @click="submitForm">提 交</el-button>
            </el-form-item>
          </el-form>
        </div>
      </el-dialog>
    </el-form>

    <!-- table -->
    <el-table v-loading="loading" :data="communList">
      <!-- <el-table-column type="selection" width="55" align="center" /> -->
      <el-table-column label="序号" align="center" width="50px">
        <template slot-scope="scope">
          <span>{{ scope.$index + 1 }}</span>
        </template>
      </el-table-column>

      <el-table-column label="项目名称" align="center" prop="projectName" />
      <el-table-column label="SN码" align="center" prop="snCode" />
      <el-table-column label="调试时间" align="center" prop="debugTime" />
      <el-table-column label="调试人" align="center" prop="debugger" />

      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['produce:ac:confirm:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['produce:ac:confirm:remove']">删除</el-button>
          <el-button size="mini" type="text" icon="el-icon-s-comment" @click="handleCommission(scope.row)" v-if="scope.row.result == '不合格'">申请调试</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />

  </div>
</template>

  <script>
// import { listCheckout, getCheckout, delCheckout, addCheckout, updateCheckout } from "@/api/system/checkout";
import {
  subCheckout,
  getCheckout,
  updataCheckout,
  deleteCheckout,
} from "@/api/mes/pro/exchangetion";
import {
  listWorkshop
} from "@/api/mes/md/workshop";
import { getLineByWorkshopId } from "@/api/mes/md/line";
import { selectUserRole } from "@/api/mes/pro/workorder";
import { requestCommission } from "@/api/mes/pro/communication";
export default {
  name: "Exchangetion",
  data() {
    return {
      // 遮罩层
      loading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 生产工单表格数据
      checkoutList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        projectName: null,
        snCode: null,
        debugTime: null,
        debugger: null,
        identifyingPeople: null,
        value1: null,
        value2: null,
        value3: null,
        value4: null,
        value5: null,
        value6: null,
        value7: null,
        value8: null,
        value9: null,
        value10: null,
        value11: null,
        value12: null,
        value13: null,
        value14: null,
        value15: null,
        value16: null,
        value17: null,
        value18: null,
        value19: null,
        value20: null,
        value21: null,
        value22: null,
        value23: null,
        value24: null,
        value25: null,
        value26: null,
        value27: null,
        value28: null,
        value29: null,
        value30: null,
        value31: null,
        value32: null,
        value33: null,
        value34: null,
        value35: null,
        value36: null,
        value37: null,
        value38: null,
        value39: null,
        value40: null,
        value41: null,
        value42: null,
        value43: null,
        value44: null,
        value45: null,
        value46: null,
        value47: null,
        value48: null,
        value49: null,
        value50: null,
        value51: null,
        value52: null,
        value53: null,
        value54: null,
        value55: null,
        result: null,
        attr1: null,
        attr2: null,
        attr3: null,
        attr4: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
      //生产车间的list
      workshopList: [],
      //根据车间id获取的产线list
      productionlineList: [],
      //tableList
      communList: [],
      //控制方式的下拉
      controlMode: [
        {
          label: "刷卡",
          value: "刷卡",
        },
        {
          label: "扫码",
          value: "扫码",
        },
        {
          label: "即插即充",
          value: "即插即充",
        },
      ],
      options: [
        {
          value: "是",
          label: "是",
        },
        {
          value: "否",
          label: "否",
        },
      ],
      //调试结果
      debuggingResults: [
        {
          value: "合格",
          label: "合格",
        },
        {
          value: "不合格",
          label: "不合格",
        },
      ],
      //不合格类型
      types: [
        {
          value: "物料器件不良",
          label: "物料器件不良",
        },
        {
          value: "开关盒不良",
          label: "开关盒不良",
        },
        {
          value: "模块不良",
          label: "模块不良",
        },
        {
          value: "枪线不良",
          label: "枪线不良",
        },
        {
          value: "PCBA板不良",
          label: "PCBA板不良",
        },
        {
          value: "箱体不良",
          label: "箱体不良",
        },
        {
          value: "线材不良",
          label: "线材不良",
        },
        {
          value: "接线错误",
          label: "接线错误",
        },
        {
          value: "接线紧固不良",
          label: "接线紧固不良",
        },
        {
          value: "装配异常",
          label: "装配异常",
        },
        {
          value: "螺钉未打紧",
          label: "螺钉未打紧",
        },
        {
          value: "分解单问题",
          label: "分解单问题",
        },
        {
          value: "设计、软件问题",
          label: "设计、软件问题",
        },
        {
          value: "BOM问题",
          label: "BOM问题",
        },
      ],
    };
  },
  created() {
    this.getList();
    //获取车间集合
    this.getworkshopList()
  },
  methods: {
    /** 查询生产工单列表 */
    getList() {
      getCheckout(this.queryParams).then((res) => {
        console.log(res, "查询的res");
        if (res.code == 200) {
          this.communList = res.rows;
          this.total = res.total;
        }
      });
    },
    //获取车间集合
    getworkshopList() {
      listWorkshop().then(res => {
        console.log(res, "车间集合list");
        if (res.code == 200) {
          this.workshopList = res.data;
        }
      });
    },
    //根据车间id获取生产产线
    selectTrigger(id) {
      console.log(id, "车间的id");
      getLineByWorkshopId(id).then(res => {
        console.log(res, "车间下的生产产线");
        if (res.code == 200) {
          this.productionlineList = res.data;
        }
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        interflowId: null,
        projectName: null,
        snCode: null,
        debugTime: null,
        debugger: null,
        identifyingPeople: null,
        value1: null,
        value2: null,
        value3: null,
        value4: null,
        value5: null,
        value6: null,
        value7: null,
        value8: null,
        value9: null,
        value10: null,
        value11: null,
        value12: null,
        value13: null,
        value14: null,
        value15: null,
        value16: null,
        value17: null,
        value18: null,
        value19: null,
        value20: null,
        value21: null,
        value22: null,
        value23: null,
        value24: null,
        value25: null,
        value26: null,
        value27: null,
        value28: null,
        value29: null,
        value30: null,
        value31: null,
        value32: null,
        value33: null,
        value34: null,
        value35: null,
        value36: null,
        value37: null,
        value38: null,
        value39: null,
        value40: null,
        value41: null,
        value42: null,
        value43: null,
        value44: null,
        value45: null,
        value46: null,
        value47: null,
        value48: null,
        value49: null,
        value50: null,
        value51: null,
        value52: null,
        value53: null,
        value54: null,
        value55: null,
        result: null,
        remark: null,
        attr1: null,
        attr2: null,
        attr3: null,
        attr4: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
      };
      this.resetForm("form");
    },
    /** 搜索 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.interflowId);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加直流充电桩确认表";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      console.log(row, "修改的row");
      this.reset();
      this.form = row;
      this.open = true;
      this.title = "修改直流充电桩确认表";
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.interflowId != null) {
            console.log(this.form, "修改的form");
            updataCheckout(this.form).then((response) => {
              if (response.code == 200) {
                this.$modal.msgSuccess("修改成功");
                this.loading = false;
                this.open = false;
                this.getList();
              }
            });
          } else {
            subCheckout(this.form).then((response) => {
              if (response.code == 200) {
                this.$modal.msgSuccess("新增成功"); //新增成功
                this.loading = false;
                this.open = false;
                //表单重置
                this.reset();
                //查询
                this.getList();
              }
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const interflowIds = row.interflowId || this.ids;
      this.$modal
        .confirm('是否确认删除生产工单编号为"' + interflowIds + '"的数据项？')
        .then(function () {
          return deleteCheckout(interflowIds);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => { });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "/mes/checkout/interflow/export",
        {
          ...this.queryParams,
        },
        `交流充电桩确认表_${new Date().getTime()}.xlsx`
      );
    },
    handleCommission(row) {
      selectUserRole("生产组组长")
        .then(res => {
          this.commissionQuery(row)
        })
        .catch(() => {
          console.log("qqqqqqqqq");
          return "false";
        });
    },
    commissionQuery(row) {
      this.$modal
        .confirm('是否确认申请调试SN编码为"' + row.snCode + '"的数据项？')
        .then(function () {
          return requestCommission({ snCode: row.snCode });
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("通知成功");
        })
        .catch(() => { });
    }
  },
};
</script>

  <style>
.item-class {
  margin-left: 30px;
}
</style>
